//
//  AreasViewController.m
//  10703B
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "AreasViewController.h"
extern int calcount;
@interface AreasViewController ()

@end

@implementation AreasViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/


- (IBAction)Areas:(UIButton *)sender
{
    NSString *string = [NSString stringWithFormat:@"%i",[self.length.text intValue] * [self.width.text intValue]];
    self.rectAreas.text = string;
    NSString *string2 = [NSString stringWithFormat:@"%.2lf",[self.r.text floatValue]*3.1415926*[self.r.text floatValue]];
    self.circleAreas.text = string2;
    NSLog(@"%s",__func__);
    calcount++;
}


- (IBAction)back:(id)sender {
     [self.view endEditing:YES];
}

@end
